<?php TPL::output('admin/global/header.tpl.htm'); ?>
<body >
<div id="body-wrapper">
<div id="main-content">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3>会员列表</h3>
			<ul class="content-box-tabs">
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div class="tab-content default-tab" id="tab1">
				<form id="_search_form" action="admin/user/list/" method="post">
					<p>
						<label> 根据帐号名或邮箱搜索：&nbsp;&nbsp;
						<input class="text-input small-input" type="text" id="keyword" name="keyword" value="<?php echo $this->keyword; ?>"/>
						&nbsp;&nbsp;
						<input class="button" type="submit" value="搜  索" />
						<?php if($this->keyword){ ?>
						&nbsp;&nbsp;&nbsp;&nbsp;
						<input class="button" type="submit" onClick="$('#keyword').val('');$('#_search_form').submit();" value="显示全部" />
						<?php } ?>
						</label>
					</p>
				</form>
				<?php if(!$this->list){ ?>
				<div class="notification attention png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
					<div> 没有内容 </div>
				</div>
				<?php }else{ ?>
				<table>
					<thead>
						<tr>
							<!--th><input class="check-all" type="checkbox" /></th-->
							<th>ID</th>
							<th>头像</th>
							<th>用户名</th>
							<th>邮箱</th>
							<th>用户组</th>
							<th>注册时间</th>
							<th>上次登录IP</th>
							<th>在线(min)</th>
							<th>威望</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						<?php foreach ($this->list AS $key => $val) { ?>
						<tr>
							<th><?php echo $val['uid']; ?></td>
							<th align="center"><div align="center"><img style="vertical-align: middle;" src="<?php echo get_avatar_url($val['uid'],'min',$val['avatar_file']); ?>"/>
									</td>
							</div>
							<td><a href="people/<?php echo $val['user_name']; ?>" target="_blank" title="title"><?php echo $val['user_name']; ?></a>
								<?php if($val['forbidden']){ ?>
								&nbsp;<font color="#FF0000">[禁止]</font>
								<?php }else if(!$val['valid_email']){ ?>
								&nbsp;<font color="#FF0000">[未验证]</font>
								<?php } ?></td>
							<td><?php echo $val['email']; ?></td>
							<td><?php echo $this->system_groups[$val['group_id']]['group_name']; ?></td>
							<td><?php echo date("Y-m-d H:i:s", $val['reg_time']); ?></td>
							<td><a href="http://www.ip.cn/?q=<?php echo long2ip(empty($val['last_ip']) ? $val['reg_ip'] : $val['last_ip']); ?>" target="_blank"><?php echo long2ip(empty($val['last_ip']) ? $val['reg_ip'] : $val['last_ip']); ?></a></td>
							<td><?php echo round($val['online_time']/60); ?></td>
							<td><?php echo $val['reputation']; ?></td>
							<td><a href="admin/user/edit/uid-<?php echo $val['uid']; ?>" title="修改"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/pencil.png"/></a> &nbsp; <a href="javascript:;" onClick="ajax_request(G_BASE_URL + '/admin/user/forbidden_status_ajax/user_id-<?php echo $val[uid]; ?>');" title="<?php if($val['forbidden']){ ?>解除禁止<?php }else{ ?>禁止用户<?php } ?>"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/<?php if($val['forbidden']){ ?>lock<?php }else{ ?>unlock<?php } ?>.png"/></a> </td>
						</tr>
						<?php } ?>
					</tbody>
					<tfoot>
						<tr>
							<td colspan="10"><div class="pagination"> <?php echo $this->pagination; ?> </div>
								<div class="clear"></div></td>
						</tr>
					</tfoot>
				</table>
				<?php } ?>
			</div>
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="关闭" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>
</div>
<?php TPL::output('admin/global/footer.tpl.htm'); ?>
